package cn.shape;

import java.awt.*;

public class HollowTriShape extends Shape{
    @Override
    public void draw(Graphics2D g) {
        g.setStroke(new BasicStroke(3, BasicStroke.CAP_ROUND, BasicStroke.JOIN_BEVEL));
        int[] x = { (x1 + x2) / 2, x1, x2 };
        int[] y = { y1, y2, y2 };
        g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
        g.drawPolygon(x, y, 3);
    }
}
